#include <iostream>
#include <cstring>
#include <string>
using namespace std;


/**
 * 大数乘上单个数字
 */
int main() {
    int a[100], len;
    memset(a, 0, sizeof(a));
    string num;
    cin >> num;
    len = num.length();
    for (int i = 1; i <= len; i++) {
        a[i] = num[len - i] - '0';
    }
    int x;
    cin >> x;

    for (int i = 1; i <= len; i++) {
        a[i] *= x;
    }

    for (int i = 1; i <= len; i++) {
        a[i + 1] += a[i] / 10;
        a[i] %= 10; 
    }

    while (a[len + 1]) {
        len++;
        a[len + 1] += a[len] / 10;
        a[len] %= 10;
    }


    for (int i = len; i >= 1; i--) {
        cout << a[i];
    }
    cout << endl;

    return 0;
}